The invention relates to a data-processing arrangement comprising an interrupt generator for carrying out a count of events of a certain type which may occur in the data-processing arrangement, and for providing an interrupt signal when a predefined number of events have been counted. The data-processing arrangement may be, for example, a multimedia processor suitable for processing various types of data.
European patent application publication number 0,395,281 describes a computer system which employs an apparatus for controllably generating interrupts to a computer system processor. The apparatus includes at least one pair of counters. The counters are configured by a value stored in a control register. Each half of the control register includes a single bit reset signal and a 12-bit select signal. Control of the particular significant event being counted by the counters is effected via a combination of multiplexers and their associated 12-bit select signals stored in the control register. The single bit reset portions of the control register are connected to the reset input ports of the counters. This feature is useful in that it provides the computer system processor with the ability to xe2x80x9cknowxe2x80x9d precisely when the counting procedure begins. An interrupt is generated when a count exceeds a preselected value.
It is an object of the invention to provide a data-processing arrangement as defined in the opening paragraph, which yields a better efficiency either cost-wise or software-wise, or both.
The invention takes the following aspects into consideration. An interrupt signal usually indicates a main event in the data-processing arrangement. The main event itself may be based on two different types of events in the data-processing arrangement. For example, let it be assumed that the following is a main event. A data processor has not completed a certain data-processing task within 300 clock cycles. This main event is based on the following two types of events X and Y. An event of the type X is that the data processor starts to carry out the task concerned. An event of the type Y is the completion of a clock cycle. Thus, the interrupt generator should start to carry out a count of events of the type Y when an event of the type X has occurred, and it should provide an interrupt signal when the count is 300.
In some data-processing arrangements, there may be a wide variety of main events which need to be indicated by means of interrupt signals. A main event may differ from an other main event not only in that the type of the events to be counted is different, but also in that the type of the event which should start the count is different. In principle, it is possible to have a dedicated interrupt generator for each different main event. However, this is not a very efficient solution in terms of hardware.
The interrupt generator described in the background art can, in principle, provide different types of interrupt signals relating to different main events. However, it has the following inconvenience. The start of a count of events of certain type, for example events of the type A, is given by means of a reset signal which originates from a controller. This implies that the controller needs to have knowledge of an event which should start the count, for example an event of the type B. If events of the type B are neither pre-defined or nor defined by the controller itself, an interrupt signal or the like is needed to inform the controller that an event of the type B has occurred. Thus, an additional interrupt generator may be required. In any case, the controller will have to interrupt any control tasks it is carrying out when an event of the type B has occurred. The controller has to instruct the interrupt generator immediately to start counting events of the type A. This requires a special subroutine in the controller software.
According to the invention, the interrupt generator comprises a programmable selector for selecting a type of event which starts the count. Accordingly, a controller, if any, can program the programmable selector in advance to select a particular type of event which starts the count. Accordingly, when the event of the selected type occurs, the interrupt generator will start the count autonomously without this requiring any intervention from a controller. Thus, there is no need to inform the controller that a count-starting event has occurred, which would otherwise require an additional interrupt generator. Furthermore, there is no need for a special subroutine in the controller software for instructing the interrupt generator to start the count. Consequently, the invention yields a better efficiency either cost-wise or software-wise, or both.
The invention and additional features, which may be optionally used to implement the invention to advantage, are apparent from and will be elucidated with reference to the drawings described hereinafter.